Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: max cookie maxage is 400 days #37

Closed
wants to merge 1 commit into from

Conversation

hmnd
Copy link

@hmnd hmnd commented Jul 11, 2024

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

Cookies are currently being set to a Max-Age of 1000 years, instead of 365 days. Per this RFC, 400 days is the maximum age that can be set for a cookie.

What is the new behavior?

Cookie Max-Age is set to 400 days.

Additional context

I first brought up this PR on the old auth-helpers repo: supabase/auth-helpers#776

As of Chrome 104, this 400 day limit is enforced and any Max-Age > 400 days will be forced down to 400 days.

This is breaking my usage with Hono (see honojs/hono#2762) and Hono does not seem motivated to change their stance on this RFC from the web server side of things.

@j4w8n
Copy link
Contributor

j4w8n commented Jul 16, 2024

I second this. It would be best for the community and ecosystem.

@J0
Copy link
Contributor

J0 commented Aug 28, 2024

Thank you for the PR. We are discussing this internally and will get back soon

@hf
Copy link
Collaborator

hf commented Aug 28, 2024

Addressed in another PR, sorry didn't see this one was open as it was raised internally.

@hf hf closed this Aug 28, 2024
@j4w8n
Copy link
Contributor

j4w8n commented Aug 28, 2024

@hmnd 🔥
#54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants